<?php
abstract class Core_Component_Sef_Business_Rewrite_Flow_Base{
	
	private $_rewriters = array();
	
	protected function __construct(){}
	
	protected function getRewriters(){
		return $this->_rewriters;
	}
	
	public function addRewriter(Core_Component_Sef_Business_Rewrite_Rewriter_Base $rewriter, $first = FALSE){
		if($first){
			$this->_rewriters = array_merge(array($rewriter), $this->_rewriters);
		}else{
			$this->_rewriters[] = $rewriter;
		}
		return $this;
	}
	
	public function newRegexRewriter(){
		$result = App::getBusiness('sef/rewrite_rewriter_regex');
		$this->addRewriter($result);
		return $result;
	}
}